package com.amazon.service;

import com.amazon.bo.ProductClass;
import com.amazon.dao.ProductClassDao;
import com.amazon.web.util.Send253SMS;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("productClassService")
public class ProductClassService {

    @Resource
    private ProductClassDao productClassDao;
    @Resource
    private SMSCodeService smsCodeService;
    @Resource
    private Send253SMS send253SMS;
    @Resource
    I18nService i18nService;

    //保存
    public boolean save(ProductClass k){
        return productClassDao.save(k);
    }

    public ProductClass getProductClassBycode(String k){
        return productClassDao.getProductClassBycode(k);
    }

    public boolean update(ProductClass k){
        return productClassDao.updateClass(k);
    }
    //关键词列表
    public List<ProductClass> getClassList(final int page, final int pageSize){
        return productClassDao.getClassList(page,pageSize);
    }
    //记录数
    public int getClassCount(){
        return productClassDao.getTotalCount(ProductClass.class,"");
    }



}
